// source --> http://www.softwater.com.pl/wp-content/themes/softwater/cookienoticepro/cookienoticepro.js
/*
* Copyright (c) 2024 Flerosoft (https://flerosoft.com)
* Software Name: Cookie Notice Pro - jQuery Plugin
* Product Page : https://cookienoticepro.flerosoft.com
* Documentation: https://cookienoticepro.flerosoft.com/docs
* Description: Cookie Notice Pro, a lightweight jQuery plugin, helps you to comply with GDPR.
Make your own cookie information popup in minutes.
* Changelog: https://cookienoticepro.flerosoft.com/docs/getting-started#item-1-4
*/
(function ($) {
'use strict'
const settingsIcon =
'';
const cookieIcon =
'';
const closeIcon = '';
/*
*--------------------------------------------------------------------------
* CONFIG OR SETTINGS - Customize the popup banner START
*--------------------------------------------------------------------------
*/
const config = {
themeSettings: {
primaryColor: "#1595d3", // Primary Color of Popup Banner
darkColor: "#3b3e4a", // Dark Theme Color
lightColor: "#ffffff", // Light Theme Color
themeMode: "light", // Theme Mode (light|dark)
},
enableGoogleConsentMode: true, // Add support for Google consent mode v2 (https://cookiebannergenerator.com/implementing-google-consent-mode-v2-with-cookie-notice-pro-a-step-by-step-guide/)
enableMinimize: true, // Enable minimized floating cookie icon to adjust preferences
showCookieIcon: true, // Hide or show the cookie icon
showSettingsBtn: true, // Hide or show the preference settings(true|false)
showCloseIcon: false, // Hide or show the popup close icon(true|false)
showDeclineBtn: true, // Hide or show the cookie decline button(true|false)
fullWidth: false, // Full width popup works only when "displayPosition" is set to top/bottom
allCheckboxesChecked: true, // The setting checkboxes should be checked by default initially or not(true|false)
displayPosition: "left", // Where popup should appear(top|right|bottom|left)
settingsBtnLabel: "Dostosuj", // Text of settings button
delay: 0, // After how much time should popup appear(2000 is equal to 2 seconds)
expires: 365, // Expiry date of cookie(365 is equal to 365 days)
title: "Zgoda na ciasteczka", // Title of popup bannner
description: "Używamy ciasteczek, aby zapewnić najlepszą jakość korzystania z naszej witryny. Sprawdź naszą ", // Message
acceptBtnLabel: "Akceptuj", // Accept cookie button text
declineInfoBtnLabel: "Zamknij", // Decline cookie button text
moreInfoBtnLink: "/polityka-prywatnosci/", // Learn more link(default: privacy policy page)
moreInfoBtnLabel: "Politykę prywatności", // More info link text
cookieTypesTitle: "Wybierz ciasteczka, na które wyrażasz zgodę", // Title of cookie preference options
necessaryCookieTypeLabel: "Niezbędne", // Label text of Necessary cookie item
floatingIconTooltip: "Zmień ustawienia ciasteczek", // Tooltip of floating cookie icon (Minimized)
necessaryCookieTypeDesc: "Te ciasteczka są niezbędne do funkcjonowania naszej witryny i nie mogą zostać wyłączone.", // Hover text of necessary cookies
onConsentAccept: ()=> { // It will inject scripts in head if cookie preferences menu(showSettingsBtn) is enabled
console.log("Wyrażono zgodę!")
},
onConsentReject: ()=> { // This code will run on cookie reject/decline
console.log("Nie wyrażono zgody!");
},
cookieTypes: [
// Cookie types, value and description (Cookie Preferences Selection)
/*{
type: "Marketing",
value: "marketing", // WARNING: DO NOT EDIT THIS VALUE
description: "Te ciasteczka służą do gromadzenia informacji o użytkownikach, by wyświetlać lepiej dostosowane do nich treści reklamowe.",
},*/
{
type: "Analityka",
value: "analytics", // WARNING: DO NOT EDIT THIS VALUE
description: "Te ciasteczka służą do gromadzenia anonimowych informacji, takich jak liczba odwiedzających i najpopularniejsze podstrony witryny. Włączenie ich pomoże nam ulepszyć naszą stronę internetową.",
},
],
};
/*
*--------------------------------------------------------------------------
* CONFIG OR SETTINGS - Customize the popup banner END
*--------------------------------------------------------------------------
*/
const COOKIE_CONSENT = 'cnp_consent' // WARNING: DO NOT EDIT THIS VALUE
const COOKIE_CONSENT_PREFS = 'cnp_prefs' // WARNING: DO NOT EDIT THIS VALUE
const GOOGLE_CONSENT_MODE_AD_PREFS = 'cnp_gconsent_ad_prefs' // WARNING: DO NOT EDIT THIS VALUE
const GOOGLE_CONSENT_MODE_ANALYTICS_STORAGE = 'cnp_gconsent_analytics_storage' // WARNING: DO NOT EDIT THIS VALUE
$.fn.cookieNoticePro = (event) => {
typeof event === 'object' ? $.extend(true, config, event) : null
changeRootVariables()
let cookieConsentExists = cookieExists(COOKIE_CONSENT)
let cookiePrefsValue = accessCookie(COOKIE_CONSENT_PREFS)
// If consent is not accepted
if (!cookieConsentExists || event == 'open') {
$('#cookieNoticePro').remove()
$('#cookieMinimizeIcon').remove()
let cookieTypes =
'